import 'package:tender_flutter/page/home/model/combo_top_entity.dart';

comboTopEntityFromJson(ComboTopEntity data, Map<String, dynamic> json) {
	if (json['money'] != null) {
		data.money = json['money'] is String
				? double.tryParse(json['money'])
				: json['money'].toDouble();
	}
	if (json['expire'] != null) {
		data.expire = json['expire'] is String
				? int.tryParse(json['expire'])
				: json['expire'].toInt();
	}
	if (json['id'] != null) {
		data.id = json['id'] is String
				? int.tryParse(json['id'])
				: json['id'].toInt();
	}
	if (json['title'] != null) {
		data.title = json['title'].toString();
	}
	return data;
}

Map<String, dynamic> comboTopEntityToJson(ComboTopEntity entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	data['money'] = entity.money;
	data['expire'] = entity.expire;
	data['id'] = entity.id;
	data['title'] = entity.title;
	return data;
}